import Vue from 'vue'
import Router from 'vue-router'
import App from '@/App.vue'

Vue.use(Router)

const routes = [
    {
        path: "/front",
        component: App,
        name: "app",
        children: [
            { path: 'payoneMoney', component: () => import("@/components/tuiguang/payoneMoney"), name: 'payoneMoney', meta: { auth: false } },//推广活动

            // { path: 'echarts', component: () => import("@/components/echarts/gupiaoEChart"), name: 'echarts', meta: { auth: false } },//K线图

            { path: 'fxTip', component: () => import("@/components/fxTip/fxTip"), name: 'fxTip', meta: { auth: false } },//风险提示
            { path: 'fxTip/Agufyxieyi', component: () => import("@/components/fxTip/Agufyxieyi"), name: 'Agufyxieyi', meta: { auth: false } },//a股交易合作涉及及费用及资费标准
            { path: 'fxTip/Aguxieyi', component: () => import("@/components/fxTip/Aguxieyi"), name: 'Aguxieyi', meta: { auth: false } },//a股交易合作协议

            { path: 'helpCenter', component: () => import("@/components/helpCenter/helpCenter"), name: 'helpCenter', meta: { auth: false } },//帮助中心
            { path: 'helpCenter/ptjs', component: () => import("@/components/helpCenter/ptjs"), name: 'ptjs', meta: { auth: false } },//平台介绍
            { path: 'helpCenter/T+1rule', component: () => import("@/components/helpCenter/T+1rule"), name: 'T+1rule', meta: { auth: false } },//T+1rule
            { path: 'helpCenter/recharge', component: () => import("@/components/helpCenter/recharge"), name: 'recharge', meta: { auth: false } },//充值提现

            { path: 'erweima', component: () => import("@/components/erweima/erweima"), name: 'erweima', meta: { auth: false } },//二维码
            
            { path: '*', component: () => import("@/base/error/404"), name: 'NotFoundComponent', meta: { auth: false } }//404
        ]
    }
]

const router = new Router({
    // mode: "history",
    base: '/templates/',  //添加的地方
    routes
})

router.afterEach((to, from, next) => {
    window.scrollTo(0, 0);
})
export default router

